﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;

using XCode;


namespace BingZi.HY.Core
{
	/// <summary>
	/// 帮助信息
	/// </summary>
	[Serializable]
	[DataObject]
	[Description("帮助信息")]
	[BindTable("app_Help", Description = "帮助信息", ConnName = "Center")]
    public partial class app_Help  
	{
		#region 属性
		private Int32 _HelpID;
		/// <summary>
		/// 编号
		/// </summary>
		[Description("编号")]
		[DataObjectField(true, true, false, 10)]
		[BindColumn(1, "HelpID", "编号", "", "int", 10, 0, false)]
		public Int32 HelpID
		{
			get { return _HelpID; }
			set { if (OnPropertyChanging("HelpID", value)) _HelpID = value; }
		}

		private String _H_Name;
		/// <summary>
		/// 文档/分类名称
		/// </summary>
		[Description("文档/分类名称")]
		[DataObjectField(false, false, false, 128)]
		[BindColumn(2, "H_Name", "文档/分类名称", "", "nvarchar(128)", 0, 0, true)]
		public String H_Name
		{
			get { return _H_Name; }
			set { if (OnPropertyChanging("H_Name", value)) _H_Name = value; }
		}

		private String _H_Description;
		/// <summary>
		/// 描述
		/// </summary>
		[Description("描述")]
		[DataObjectField(false, false, true, 1073741823)]
		[BindColumn(3, "H_Description", "描述", "", "ntext", 0, 0, true)]
		public String H_Description
		{
			get { return _H_Description; }
			set { if (OnPropertyChanging("H_Description", value)) _H_Description = value; }
		}

		private Int32 _H_ParentID;
		/// <summary>
		/// 上级编号
		/// </summary>
		[Description("上级编号")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(4, "H_ParentID", "上级编号", "0", "int", 10, 0, false)]
		public Int32 H_ParentID
		{
			get { return _H_ParentID; }
			set { if (OnPropertyChanging("H_ParentID", value)) _H_ParentID = value; }
		}

		private Int32 _H_ShowOrder;
		/// <summary>
		/// 显示顺序
		/// </summary>
		[Description("显示顺序")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(5, "H_ShowOrder", "显示顺序", "", "int", 10, 0, false)]
		public Int32 H_ShowOrder
		{
			get { return _H_ShowOrder; }
			set { if (OnPropertyChanging("H_ShowOrder", value)) _H_ShowOrder = value; }
		}

		private Int32 _H_Level;
		/// <summary>
		/// 当前分类所在层数
		/// </summary>
		[Description("当前分类所在层数")]
		[DataObjectField(false, false, true, 10)]
		[BindColumn(6, "H_Level", "当前分类所在层数", "", "int", 10, 0, false)]
		public Int32 H_Level
		{
			get { return _H_Level; }
			set { if (OnPropertyChanging("H_Level", value)) _H_Level = value; }
		}

		private Int32 _H_ChildCount;
		/// <summary>
		/// 当前分类子分类数
		/// </summary>
		[Description("当前分类子分类数")]
		[DataObjectField(false, false, true, 10)]
		[BindColumn(7, "H_ChildCount", "当前分类子分类数", "", "int", 10, 0, false)]
		public Int32 H_ChildCount
		{
			get { return _H_ChildCount; }
			set { if (OnPropertyChanging("H_ChildCount", value)) _H_ChildCount = value; }
		}

		private Int32 _H_Delete;
		/// <summary>
		/// 是否删除1:是0:否
		/// </summary>
		[Description("是否删除1:是0:否")]
		[DataObjectField(false, false, false, 3)]
		[BindColumn(8, "H_Delete", "是否删除1:是0:否", "", "tinyint", 3, 0, false)]
		public Int32 H_Delete
		{
			get { return _H_Delete; }
			set { if (OnPropertyChanging("H_Delete", value)) _H_Delete = value; }
		}

		private Int32 _H_HelpType;
		/// <summary>
        /// 类型 0:分类;1:信息;2:HTML模块
		/// </summary>
        [Description("类型 0:分类;1:信息;2:HTML模块")]
		[DataObjectField(false, false, false, 3)]
        [BindColumn(9, "H_HelpType", "类型 0:分类;1:信息;2:HTML模块", "", "tinyint", 3, 0, false)]
		public Int32 H_HelpType
		{
			get { return _H_HelpType; }
			set { if (OnPropertyChanging("H_HelpType", value)) _H_HelpType = value; }
		}

		private DateTime _H_LastTime;
		/// <summary>
		/// 最后操作时间
		/// </summary>
		[Description("最后操作时间")]
		[DataObjectField(false, false, false, 3)]
		[BindColumn(10, "H_LastTime", "最后操作时间", "", "datetime", 3, 0, false)]
		public DateTime H_LastTime
		{
			get { return _H_LastTime; }
			set { if (OnPropertyChanging("H_LastTime", value)) _H_LastTime = value; }
		}

		private Int32 _H_LastUserID;
		/// <summary>
		/// 最后操作用户
		/// </summary>
		[Description("最后操作用户")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(11, "H_LastUserID", "最后操作用户", "", "int", 10, 0, false)]
		public Int32 H_LastUserID
		{
			get { return _H_LastUserID; }
			set { if (OnPropertyChanging("H_LastUserID", value)) _H_LastUserID = value; }
		}
		#endregion

		#region 获取/设置 字段值
		/// <summary>
		/// 获取/设置 字段值。
		/// 一个索引，基类使用反射实现。
		/// 派生实体类可重写该索引，以避免反射带来的性能损耗
		/// </summary>
		/// <param name="name">字段名</param>
		/// <returns></returns>
		public override Object this[String name]
		{
			get
			{
				switch (name)
				{
					case "HelpID" : return _HelpID;
					case "H_Name" : return _H_Name;
					case "H_Description" : return _H_Description;
					case "H_ParentID" : return _H_ParentID;
					case "H_ShowOrder" : return _H_ShowOrder;
					case "H_Level" : return _H_Level;
					case "H_ChildCount" : return _H_ChildCount;
					case "H_Delete" : return _H_Delete;
					case "H_HelpType" : return _H_HelpType;
					case "H_LastTime" : return _H_LastTime;
					case "H_LastUserID" : return _H_LastUserID;
					default: return base[name];
				}
			}
			set
			{
				switch (name)
				{
					case "HelpID" : _HelpID = Convert.ToInt32(value); break;
					case "H_Name" : _H_Name = Convert.ToString(value); break;
					case "H_Description" : _H_Description = Convert.ToString(value); break;
					case "H_ParentID" : _H_ParentID = Convert.ToInt32(value); break;
					case "H_ShowOrder" : _H_ShowOrder = Convert.ToInt32(value); break;
					case "H_Level" : _H_Level = Convert.ToInt32(value); break;
					case "H_ChildCount" : _H_ChildCount = Convert.ToInt32(value); break;
					case "H_Delete" : _H_Delete = Convert.ToInt32(value); break;
					case "H_HelpType" : _H_HelpType = Convert.ToInt32(value); break;
					case "H_LastTime" : _H_LastTime = Convert.ToDateTime(value); break;
					case "H_LastUserID" : _H_LastUserID = Convert.ToInt32(value); break;
					default: base[name] = value; break;
				}
			}
		}
		#endregion

		#region 字段名
		/// <summary>
		/// 取得帮助信息字段名的快捷方式
		/// </summary>
		public class _
		{
			///<summary>
			/// 编号
			///</summary>
			public const String HelpID = "HelpID";

			///<summary>
			/// 文档/分类名称
			///</summary>
			public const String H_Name = "H_Name";

			///<summary>
			/// 描述
			///</summary>
			public const String H_Description = "H_Description";

			///<summary>
			/// 上级编号
			///</summary>
			public const String H_ParentID = "H_ParentID";

			///<summary>
			/// 显示顺序
			///</summary>
			public const String H_ShowOrder = "H_ShowOrder";

			///<summary>
			/// 当前分类所在层数
			///</summary>
			public const String H_Level = "H_Level";

			///<summary>
			/// 当前分类子分类数
			///</summary>
			public const String H_ChildCount = "H_ChildCount";

			///<summary>
			/// 是否删除1:是0:否
			///</summary>
			public const String H_Delete = "H_Delete";

			///<summary>
			/// 类型1:信息;0:分类
			///</summary>
			public const String H_HelpType = "H_HelpType";

			///<summary>
			/// 最后操作时间
			///</summary>
			public const String H_LastTime = "H_LastTime";

			///<summary>
			/// 最后操作用户
			///</summary>
			public const String H_LastUserID = "H_LastUserID";
		}
		#endregion
	}
}